package IHM;

import java.awt.Color;
import java.awt.event.ActionListener;
import java.util.Timer;

import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

public class LED extends JPanel {

	private int delay = 150; //milliseconds

	public LED(){
		this.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		this.setBackground(Color.LIGHT_GRAY);
	}

	public void flasher() {
		setBackground(Color.GREEN);
		try {
			Thread.sleep(delay);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		eteindre();
	}


	public void eteindre(){
		this.setBackground(Color.LIGHT_GRAY);
	}
}
